<?php
class BoletimC extends CI_Controller {

	public function __construct( ) {
		parent::__construct( );
		
		$this->load->model('boletim');
		
		if (!isset($_SESSION))
			session_cache_expire(500);
		session_start();
	}
	
	public function ajaxRecuperar(){
		$id = (int)$this->input->post("id");
		
		$busca = array("rbo_usuario"=>$id);
		$boletim = $this->boletim->buscar($busca);
		if ($boletim){			
			$resp['boletim'] = $boletim['rbo_id'];						
			echo json_encode ( $resp );
		}
	}
	
}